package cn.net.sinodata.system.service;

import cn.net.sinodata.common.core.enums.LockKeyEnum;

/**
 * 交易日志Service接口
 *
 * @author dongshaoyang
 * @date 2025-10-31
 */
public interface IBmDistributedLockService {

    boolean tryLock(LockKeyEnum lockKey);

    boolean tryLock(LockKeyEnum lockKey, long expireTimeMillis);

    boolean lockWithWait(LockKeyEnum lockKey, long waitTimeMillis);

    boolean lockWithWait(LockKeyEnum lockKey, long expireTimeMillis, long waitTimeMillis);

    void lock(LockKeyEnum lockKey);

    void lock(LockKeyEnum lockKey, long expireTimeMillis);

    boolean unlock(LockKeyEnum lockKey);

    void cleanExpiredLock();

}
